package ink.lovejinhu.GoldenCodeOfProgrammerInterview;

import java.util.HashSet;

/**
 * @author jinhu
 * created 2021-08-09 17:24
 */
public class Interview_0101 {
    /**
     * 是否唯一
     *
     * @param astr
     * @return
     */
    public boolean isUnique(String astr) {
        HashSet<Character> characters = new HashSet<>();
        for (int i = 0; i < astr.length(); i++) {
            if (characters.contains(astr.charAt(i))) {
                return false;
            } else {
                characters.add(astr.charAt(i));
            }
        }
        return true;
    }

    public static void main(String[] args) {
        int a=3;
        System.out.println(a>>1);
        System.out.println(1<<a);
    }
}
